Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key-value execution tags #5453

Merged
merged 17 commits into from
Jun 8, 2024
Merged

Key-value execution tags #5453

merged 17 commits into from
Jun 8, 2024

Conversation

pingsutw
Copy link
Member

@pingsutw pingsutw commented Jun 6, 2024

Tracking issue

#3960

Why are the changes needed?

The current execution tag is a hash tag (key-only tag), but we want to support a key-value tag. The key is required, but the value is optional. That said, you can still use a hash tag by not providing a value.

What changes were proposed in this pull request?

Tables

  • Drop execution_admin_tags table
  • Drop admin_tags table
  • Add execution_tags table

To keep backward compatibility, both labels and tags in the executionSpc will be added to the new execution_tags table.

Endpoint to get the workflows with tags

The old filter still works, and it will get the tag from the new table

How was this patch tested?

local sandbox

pyflyte run --remote --label tokio=3 --label rust=6 flyte-example/getting_started.py wf
pyflyte run --remote --tag 123 --tag 456 flyte-example/getting_started.py wf 

Screenshots

Screenshot 2024-06-06 at 3 50 34 PM

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

NA

Docs link

NA

pingsutw added 13 commits May 14, 2024 10:00
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Copy link

codecov bot commented Jun 6, 2024

Codecov Report

Attention: Patch coverage is 24.32432% with 84 lines in your changes missing coverage. Please review.

Project coverage is 60.99%. Comparing base (25c3596) to head (5684388).
Report is 138 commits behind head on master.

Files with missing lines Patch % Lines
flyteadmin/pkg/repositories/config/migrations.go 0.00% 32 Missing ⚠️
...teadmin/pkg/repositories/transformers/execution.go 0.00% 24 Missing ⚠️
flyteadmin/pkg/manager/impl/execution_manager.go 50.00% 17 Missing and 1 partial ⚠️
...eadmin/pkg/repositories/gormimpl/execution_repo.go 53.84% 3 Missing and 3 partials ⚠️
flyteadmin/pkg/common/filters.go 33.33% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5453      +/-   ##
==========================================
- Coverage   61.07%   60.99%   -0.09%     
==========================================
  Files         793      793              
  Lines       51226    51295      +69     
==========================================
- Hits        31288    31287       -1     
- Misses      17062    17128      +66     
- Partials     2876     2880       +4     
Flag Coverage Δ
unittests-datacatalog 69.31% <ø> (ø)
unittests-flyteadmin 58.62% <24.32%> (-0.29%) ⬇️
unittests-flytecopilot 17.79% <ø> (ø)
unittests-flytectl 67.97% <ø> (ø)
unittests-flyteidl 79.04% <ø> (ø)
unittests-flyteplugins 61.94% <ø> (ø)
unittests-flytepropeller 57.32% <ø> (ø)
unittests-flytestdlib 65.82% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

pingsutw added 2 commits June 6, 2024 18:54
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Copy link
Contributor

@eapolinario eapolinario left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking pretty good. Left a few comments.

flyteadmin/pkg/repositories/config/migrations.go Outdated Show resolved Hide resolved
flyteadmin/pkg/repositories/models/execution.go Outdated Show resolved Hide resolved
flyteadmin/pkg/repositories/models/execution.go Outdated Show resolved Hide resolved
flyteadmin/pkg/repositories/config/migrations.go Outdated Show resolved Hide resolved
pingsutw added 2 commits June 7, 2024 14:13
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
@pingsutw pingsutw merged commit 38883c7 into master Jun 8, 2024
48 of 50 checks passed
@pingsutw pingsutw deleted the execution-tags-v2 branch June 8, 2024 02:35
robert-ulbrich-mercedes-benz pushed a commit to robert-ulbrich-mercedes-benz/flyte that referenced this pull request Jul 2, 2024
@pingsutw pingsutw added the flyteadmin Issue for FlyteAdmin Service label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyteadmin Issue for FlyteAdmin Service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants